<template>
	<view>
		<view class="price">￥：{{item.price}}</view>
		<view class="title item">
			<text>课程名称</text>
			<text>{{item.title}}</text>
		</view>
		<view class="classname item">
			<text>机构名称</text>
			<text>腾讯课堂</text>
		</view>
		<button type="primary" @click="handlePay">支付</button>
	</view>	
</template>

<script setup>
	import {
		onLoad,
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue';
	const item = ref({})
	onLoad(options => {
		console.log()
		item.value = options
	})
	const handlePay = () => {
		wx.requestPayment({
		  timeStamp: '',
		  nonceStr: '',
		  package: '',
		  signType: 'MD5',
		  paySign: '',
		  success (res) {
			  console.log(res)
		  },
		  fail (res) {
			  console.log(res)
		  }
		})
	}
</script>

<style lang="scss">
.price {
	height: 400rpx;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 60rpx;
	font-weight: bold;
}

.item {
	display: flex;
	justify-content: space-between;
	padding: 0 20rpx;
	height: 100rpx;
	align-items: center;
	border-top: 1px solid #ccc;
}
</style>